<%@ page language="java" contentType="text/html; charset=UTF-8"  import="org.springframework.ui.ModelMap" import="java.util.*,com.device.operating.entity.*"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../xasj/js/jquery-1.4.js"></script>
<script type="text/javascript" src="../xasj/js/framework.js"></script>
<script type="text/javascript" src="../xasj/js/form/multiselect.js"></script>
<script type="text/javascript" src="../xasj/js/form/stepForm.js" ></script>
<link  rel="stylesheet" type="text/css" id="skin"/>
<link href="../xasj/css/import_basic.css" rel="stylesheet" type="text/css"/>
<link href="../xasj/css/skins/sky/import_skin.css" rel="stylesheet" type="text/css" themeColor="blue"/>
<script type="text/javascript">
function test(){
    var cb = document.getElementById('cbox');
    cb.checked;
}

function go(url) {
	window.location.href = url;
	}
function add(){
document.getElementById('fields').submit();	
}

</script>
</head>
<body>
<div class="position">
	<div class="center">
	<div class="left">
	<div class="right">
		<span>当前位置：数据操作>> 分配资源</span>
	</div>	
	</div>	
	</div>
</div>	
<%
List<Jifang> lj=new ArrayList<Jifang>();
if(request.getAttribute("lj")!=null)
	lj=(List<Jifang>)request.getAttribute("lj");
Jifang jifang=null;
if(request.getAttribute("jifang")!=null)
	jifang=(Jifang)request.getAttribute("jifang");
String proname=request.getAttribute("proname").toString();
String title=request.getAttribute("title").toString();
String gjjx=request.getAttribute("gjjx").toString();
String pqwz=request.getAttribute("pqwz").toString();
String lianxiren=request.getAttribute("lianxiren").toString();
String proreq=request.getAttribute("proreq").toString();
String obdloc=request.getAttribute("obdloc").toString();
String obdname=request.getAttribute("obdname").toString();
String sqbm=request.getAttribute("sqbm").toString();
String sqr=request.getAttribute("sqr").toString();
String realpath=request.getAttribute("realpath").toString();
String onuodf="";
String onuport="";
String onucvlan="";
String onusvlan="";
String onuiptvsvlan="";
String onuitmsvlan="";
String onuvsvlan="";
String oltname="";
String oltip="";
int oltuseponnum=0;
String onuId="";
Olt olt=null;

if(request.getAttribute("onuId")!=null)
onuId=request.getAttribute("onuId").toString();
if(request.getAttribute("onuodf")!=null)
onuodf=request.getAttribute("onuodf").toString();
if(request.getAttribute("onuport")!=null)
onuport=request.getAttribute("onuport").toString();
if(request.getAttribute("onuodf")!=null)
onucvlan=request.getAttribute("onucvlan").toString();
if(request.getAttribute("onuodf")!=null)
onusvlan=request.getAttribute("onusvlan").toString();
if(request.getAttribute("onuodf")!=null)
onuiptvsvlan=request.getAttribute("onuiptvsvlan").toString();
if(request.getAttribute("onuodf")!=null)
onuitmsvlan=request.getAttribute("onuitmsvlan").toString();
if(request.getAttribute("onuodf")!=null)
onuvsvlan=request.getAttribute("onuvsvlan").toString();
if(request.getAttribute("olt")!=null){
	olt=(Olt)request.getAttribute("olt");
	oltname=olt.getOltname();
	oltip=olt.getOltip();
	oltuseponnum=olt.getOltuseponnum();
}
%>
<div id="scrollContent">
<div class="box1" panelWidth="1000">
<form method="post" action="" class="stepForm" stepFormTitle="true">
	<div id="step1" class="stepForm" stepFormTitle="">
		<table class="tableStyle" >
			<tr>
				<td colspan="15"><div align="center">西安FTTH工程建设项目OBD开通资源申请表</div></td>
			</tr>
			<tr>
			  <td width="120">业务需求</td>
			  <td colspan="14"><%=proreq%></td>
		    </tr>
			<tr>
			  <td>项目名称</td>
			  <td colspan="14"><%=proname%></td>
		    </tr>
			<tr>
			  <td>上联OLT</td>
			  <td width="120">机房：</td>
			  <td colspan="3">
			  <%if(jifang==null){%>
				<select id="jf" name="jf" colNum="5" class="validate[required]">
				<%
				for(Jifang jf:lj){%>
				<option  value="<%=jf.getJfId()%>"><%=jf.getJfname()%></option>			
				<%}%>
				</select>  
			  <%}else{%>
				 <input type="text" name="jifang" value="<%=jifang.getJfname()%>"/> 
			  <%}%>
			  </td>
			  <td width="120">OLT编号</td>
			  <td ><input style="width:150px;"type="text" name="oltname" value="<%=oltname%>"/></td>
			  <td ><input style="width:80px;"type="text" name="oltip" value="<%=oltip%>"/></td>
			  <td width="100">剩余PON口数</td>
			  <td ><input style="width:60px;"type="text" name="oltuseponnum" value="<%=oltuseponnum%>"/></td>
		    </tr>
			<tr>
			  <td>用户端<input type="text" name="onuId" value="<%=onuId%>"style="display:none"/><input type="text" name="realpath" value="<%=realpath%>"style="display:none"/></td>
			  <td>光交接箱：</td>
			  <td colspan="3"><%=gjjx%></td>
		      <td>配纤位置</td>
		      <td colspan="7"><%=pqwz%></td>
	      </tr>
			<tr>
              <td rowspan="2">OBD详细需求信息</td>
			  <td>OBD名称：</td>
			  <td width="130">OBD安装位置：</td>
			  <td width="130">分光比</td>
			  <td width="130">端口</td>
			  <td>局端ODF位置</td>
			  <td width="100">宽带svlan</td>
			  <td width="130">起始cvlan</td>
			  <td width="130">语音svlan</td>
			  <td width="130">iptv svlan</td>
			  <td width="130">itms svlan</td>

		  </tr>
			<tr>
              <td><input style="width:120px;"type="text" name="obdname" value="<%=obdname%>"/></td>
			  <td><input style="width:120px;"type="text" name="obdloc" value="<%=obdloc%>"/></td>
			  <td>&nbsp;</td>
			  <td><input style="width:60px;"type="text" name="onuport" value="<%=onuport%>"/></td>
			  <td><input style="width:60px;"type="text" name="onuodf" value="<%=onuodf%>"/></td>
			  <td><input style="width:60px;"type="text" name="onusvlan" value="<%=onusvlan%>"/></td>
			  <td><input style="width:60px;"type="text" name="onucvlan" value="<%=onucvlan%>"/></td>
			  <td><input style="width:60px;"type="text" name="onuvsvlan" value="<%=onuvsvlan%>"/></td>
			  <td><input style="width:60px;"type="text" name="onuiptvsvlan" value="<%=onuiptvsvlan%>"/></td>
			  <td><input style="width:60px;"type="text" name="onuitmsvlan" value="<%=onuitmsvlan%>"/></td>

		  </tr>
			<tr>
              <td>申请部门</td>
			  <td colspan="2"><%=sqbm%></td>
			  <td>申请人</td>
			  <td><%=sqr%></td>
			  <td colspan="6">&nbsp;</td>
			  <td colspan="4">&nbsp;</td>
		  </tr>
			<tr>
              <td>情况反馈</td>
			  <td colspan="14"><textarea mode="min" editorWidth="800" editorHeight="300 class="rich"></textarea></td>
		  </tr>
			
			<tr>
				<td colspan="15">
				<%if(request.getAttribute("olt")==null){ %>
					<input type="button"  
					onclick="gourl()"
					value="下一步"/>
					<%}else{%>
					<input type='submit' onclick="javascript:this.form.action='/xasj/createxcel';"value='提交' >
					<%}%>
				</td>
			</tr>
		</table>
	</div>	
</form>
</div>
</div>	
<script type="text/javascript">
function gourl(){
	var jfname=document.getElementById('jf').value.toString();
	window.location.href='distrionu?jifang='+jfname+'&proreq=<%=proreq%>&title=<%=title%>&gjjx=<%=gjjx%>&pqwz=<%=pqwz%>&lianxiren=<%=lianxiren%>&obdloc=<%=obdloc%>&obdname=<%=obdname%>&sqbm=<%=sqbm%>&sqr=<%=sqr%>&proname=<%=proname%>&realpath=<%=realpath%>';
}
</script>
</body>
</html>